<?php if (Yii::app()->user->isGuest): ?>
<span>or login using the following services:</span>
<br/>
<div id="uLogin" x-ulogin-params="display=<?php echo $display ?>;fields=<?php echo $fields ?>;providers=<?php echo $providers ?>;hidden=<?php echo $hidden ?>;redirect_uri=<?php echo urlencode($redirect) ?>;receiver=<?php echo urlencode($receiver) ?>">
	<img src="/images/blank.gif" class="facebook" x-ulogin-button = "facebook"/>
	<img src="/images/blank.gif" class="twitter" x-ulogin-button = "twitter"/>
	<img src="/images/blank.gif" class="google" x-ulogin-button = "google"/>
	<img src="/images/blank.gif" class="vkontakte" x-ulogin-button = "vkontakte"/>
	<img src="/images/blank.gif" class="linkedin" x-ulogin-button = "linkedin"/>
</div>
<?php else: ?>
    <?
    echo CHtml::link(Yii::app()->user->getName(), Yii::app()->createUrl('userDocuments/index'), array('class'=>'username'));
    echo CHtml::link('Выйти', array($logout_url), array('class'=>'btn'));
    ?>
<?php endif ?>